Optimal. Leaf size=228 \[ \frac {3 (2 i A-3 B) c^{5/2} \text {ArcTan}\left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{\sqrt {a} f}+\frac {3 (2 i A-3 B) c^2 \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{2 a f}+\frac {(2 i A-3 B) c \sqrt {a+i a \tan (e+f x)} (c-i c \tan (e+f x))^{3/2}}{2 a f}+\frac {(i A-B) (c-i c \tan (e+f x))^{5/2}}{f \sqrt {a+i a \tan (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 228, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {3669, 79, 52,
65, 223, 209} \begin {gather*} \frac {3 c^{5/2} (-3 B+2 i A) \text {ArcTan}\left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{\sqrt {a} f}+\frac {3 c^2 (-3 B+2 i A) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{2 a f}+\frac {c (-3 B+2 i A) \sqrt {a+i a \tan (e+f x)} (c-i c \tan (e+f x))^{3/2}}{2 a f}+\frac {(-B+i A) (c-i c \tan (e+f x))^{5/2}}{f \sqrt {a+i a \tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 52
Rule 65
Rule 79
Rule 209
Rule 223
Rule 3669
Rubi steps
\begin {align*} \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^{5/2}}{\sqrt {a+i a \tan (e+f x)}} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {(A+B x) (c-i c x)^{3/2}}{(a+i a x)^{3/2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(i A-B) (c-i c \tan (e+f x))^{5/2}}{f \sqrt {a+i a \tan (e+f x)}}-\frac {((2 A+3 i B) c) \text {Subst}\left (\int \frac {(c-i c x)^{3/2}}{\sqrt {a+i a x}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(2 i A-3 B) c \sqrt {a+i a \tan (e+f x)} (c-i c \tan (e+f x))^{3/2}}{2 a f}+\frac {(i A-B) (c-i c \tan (e+f x))^{5/2}}{f \sqrt {a+i a \tan (e+f x)}}-\frac {\left (3 (2 A+3 i B) c^2\right ) \text {Subst}\left (\int \frac {\sqrt {c-i c x}}{\sqrt {a+i a x}} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac {3 (2 i A-3 B) c^2 \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{2 a f}+\frac {(2 i A-3 B) c \sqrt {a+i a \tan (e+f x)} (c-i c \tan (e+f x))^{3/2}}{2 a f}+\frac {(i A-B) (c-i c \tan (e+f x))^{5/2}}{f \sqrt {a+i a \tan (e+f x)}}-\frac {\left (3 (2 A+3 i B) c^3\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+i a x} \sqrt {c-i c x}} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac {3 (2 i A-3 B) c^2 \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{2 a f}+\frac {(2 i A-3 B) c \sqrt {a+i a \tan (e+f x)} (c-i c \tan (e+f x))^{3/2}}{2 a f}+\frac {(i A-B) (c-i c \tan (e+f x))^{5/2}}{f \sqrt {a+i a \tan (e+f x)}}+\frac {\left (3 (2 i A-3 B) c^3\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2 c-\frac {c x^2}{a}}} \, dx,x,\sqrt {a+i a \tan (e+f x)}\right )}{a f}\\ &=\frac {3 (2 i A-3 B) c^2 \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{2 a f}+\frac {(2 i A-3 B) c \sqrt {a+i a \tan (e+f x)} (c-i c \tan (e+f x))^{3/2}}{2 a f}+\frac {(i A-B) (c-i c \tan (e+f x))^{5/2}}{f \sqrt {a+i a \tan (e+f x)}}+\frac {\left (3 (2 i A-3 B) c^3\right ) \text {Subst}\left (\int \frac {1}{1+\frac {c x^2}{a}} \, dx,x,\frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c-i c \tan (e+f x)}}\right )}{a f}\\ &=\frac {3 (2 i A-3 B) c^{5/2} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{\sqrt {a} f}+\frac {3 (2 i A-3 B) c^2 \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{2 a f}+\frac {(2 i A-3 B) c \sqrt {a+i a \tan (e+f x)} (c-i c \tan (e+f x))^{3/2}}{2 a f}+\frac {(i A-B) (c-i c \tan (e+f x))^{5/2}}{f \sqrt {a+i a \tan (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.94, size = 185, normalized size = 0.81 \begin {gather*} -\frac {c^3 \sec (e+f x) (\cos (f x)+i \sin (f x)) \left (6 (-2 i A+3 B) \text {ArcTan}(\cos (e+f x)+i \sin (e+f x)) (\cos (f x)-i \sin (f x))+\frac {1}{2} \sec ^2(e+f x) (5 (-2 i A+3 B)+(-10 i A+13 B) \cos (2 (e+f x))+(2 A+5 i B) \sin (2 (e+f x))) (\cos (e+2 f x)-i \sin (e+2 f x))\right )}{2 f \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 565 vs. \(2 (188 ) = 376\).
time = 0.47, size = 566, normalized size = 2.48
method | result | size |
derivativedivides | \(\frac {i \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, c^{2} \left (6 i A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c \left (\tan ^{2}\left (f x +e \right )\right )+18 i B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c \tan \left (f x +e \right )+4 i B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{2}\left (f x +e \right )\right )-9 B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c \left (\tan ^{2}\left (f x +e \right )\right )+B \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \left (\tan ^{3}\left (f x +e \right )\right )-6 i A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c -12 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \tan \left (f x +e \right )+12 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c \tan \left (f x +e \right )+2 A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{2}\left (f x +e \right )\right )-14 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}+9 B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c +19 B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )-10 A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\right )}{2 f a \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \left (i-\tan \left (f x +e \right )\right )^{2} \sqrt {a c}}\) | \(566\) |
default | \(\frac {i \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, c^{2} \left (6 i A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c \left (\tan ^{2}\left (f x +e \right )\right )+18 i B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c \tan \left (f x +e \right )+4 i B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{2}\left (f x +e \right )\right )-9 B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c \left (\tan ^{2}\left (f x +e \right )\right )+B \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \left (\tan ^{3}\left (f x +e \right )\right )-6 i A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c -12 i A \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \tan \left (f x +e \right )+12 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c \tan \left (f x +e \right )+2 A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \left (\tan ^{2}\left (f x +e \right )\right )-14 i B \sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}+9 B \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}}{\sqrt {a c}}\right ) a c +19 B \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\, \tan \left (f x +e \right )-10 A \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \sqrt {a c}\right )}{2 f a \sqrt {a c \left (1+\tan ^{2}\left (f x +e \right )\right )}\, \left (i-\tan \left (f x +e \right )\right )^{2} \sqrt {a c}}\) | \(566\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 1403 vs. \(2 (184) = 368\).
time = 1.01, size = 1403, normalized size = 6.15 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 570 vs. \(2 (184) = 368\).
time = 4.42, size = 570, normalized size = 2.50 \begin {gather*} -\frac {3 \, \sqrt {\frac {{\left (4 \, A^{2} + 12 i \, A B - 9 \, B^{2}\right )} c^{5}}{a f^{2}}} {\left (a f e^{\left (3 i \, f x + 3 i \, e\right )} + a f e^{\left (i \, f x + i \, e\right )}\right )} \log \left (\frac {4 \, {\left (2 \, {\left ({\left (2 i \, A - 3 \, B\right )} c^{2} e^{\left (3 i \, f x + 3 i \, e\right )} + {\left (2 i \, A - 3 \, B\right )} c^{2} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} + \sqrt {\frac {{\left (4 \, A^{2} + 12 i \, A B - 9 \, B^{2}\right )} c^{5}}{a f^{2}}} {\left (a f e^{\left (2 i \, f x + 2 i \, e\right )} - a f\right )}\right )}}{{\left (2 i \, A - 3 \, B\right )} c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (2 i \, A - 3 \, B\right )} c^{2}}\right ) - 3 \, \sqrt {\frac {{\left (4 \, A^{2} + 12 i \, A B - 9 \, B^{2}\right )} c^{5}}{a f^{2}}} {\left (a f e^{\left (3 i \, f x + 3 i \, e\right )} + a f e^{\left (i \, f x + i \, e\right )}\right )} \log \left (\frac {4 \, {\left (2 \, {\left ({\left (2 i \, A - 3 \, B\right )} c^{2} e^{\left (3 i \, f x + 3 i \, e\right )} + {\left (2 i \, A - 3 \, B\right )} c^{2} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} - \sqrt {\frac {{\left (4 \, A^{2} + 12 i \, A B - 9 \, B^{2}\right )} c^{5}}{a f^{2}}} {\left (a f e^{\left (2 i \, f x + 2 i \, e\right )} - a f\right )}\right )}}{{\left (2 i \, A - 3 \, B\right )} c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (2 i \, A - 3 \, B\right )} c^{2}}\right ) + 4 \, {\left (3 \, {\left (-2 i \, A + 3 \, B\right )} c^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, {\left (-2 i \, A + 3 \, B\right )} c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 \, {\left (-i \, A + B\right )} c^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{4 \, {\left (a f e^{\left (3 i \, f x + 3 i \, e\right )} + a f e^{\left (i \, f x + i \, e\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (- i c \left (\tan {\left (e + f x \right )} + i\right )\right )^{\frac {5}{2}} \left (A + B \tan {\left (e + f x \right )}\right )}{\sqrt {i a \left (\tan {\left (e + f x \right )} - i\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+B\,\mathrm {tan}\left (e+f\,x\right )\right )\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{5/2}}{\sqrt {a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________